#include <stdio.h>
int main(){
    FILE *fp=fopen("test.txt","r");
    if (fp==NULL)
    {
        printf("Error opening file\n");
        return 0;
    }else{
        printf("File opened successfully\n");
    }
    
    char line[100];
    while ((line,sizeof(line),fp))
    {
        /* code */
        printf("%s",line);
    }
    
    
    

    
    fclose(fp);
    
   
    return 0;
}